import { Injectable } from '@angular/core';
import {Observable} from "rxjs/Observable";
import {MsgResult} from "../../../../models/msg-result";
import {DamAPI} from "../../peach-constants";
import {RequestUtil} from "../../../../util/request-util";

@Injectable()
export class CountyRankingService {

  constructor(
    private requestUtil: RequestUtil
  ) { }
  getCountyRankingData(obj):Observable<MsgResult>{
    let params = "format=json"+"&startTime="+obj.startTime+"&endTime="+obj.endTime+"&scopeType="+obj.scopeType+"&dataType="+obj.dataType+"&sortScopeType=areaCountySort";
    return this.requestUtil.get(DamAPI.allRankingData,params);
  }
}
